﻿using Abp.NHibernate.EntityMappings;
using Abp.Localization;
using Akso.Authorization.Users;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using FluentNHibernate.Mapping;

namespace Akso.NHibernate.EntityMappings
{
    /// <summary>
    /// Define mapping between <see cref="LanguageInfo"/> entity and "AbpLanguages" table using FluentNHibernate.
    /// 
    /// Inherits from <see cref="EntityMap{TEntity,TPrimaryKey}"/>.
    /// EntityMap gets table name in it's constructor and automatically maps Id property. So, we do not map Id again.
    /// </summary>
    public class LanguageMap : ClassMap<LanguageInfo>
    {
        public LanguageMap()
        {
            Table("dbo.AbpLanguages");
            LazyLoad();
            //Id(x => x.Id);
            Map(x => x.DisplayName);
            Map(x => x.Icon);
            Map(x => x.IsDefault);
            Map(x => x.Name);
            //References(x => x.AssignedPerson).Column("AssignedPersonId").LazyLoad();
        }
    }
}
